package com.correo.modelo.server;

import java.sql.SQLException;
import java.util.List;

import com.correo.database.beans.IBean;
import com.correo.database.server.ManagerDataBase;
import com.correo.exceptions.server.AltaException;
import com.correo.exceptions.server.ModifyException;
import com.correo.exceptions.server.RefreshException;
import com.correo.exceptions.server.RemoveException;
import com.correo.exceptions.server.ViewException;

public class ModelOficce implements IModel{

	
	@Override
	public void modify(IBean bean) throws ModifyException, SQLException, ClassNotFoundException {
		ManagerDataBase.getInstance().getMngOfficeDataBase().modify(bean);
		
	}

	

	@Override
	public void view(IBean bean) throws ViewException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void alta(IBean Bean) throws AltaException, SQLException, ClassNotFoundException {
		ManagerDataBase.getInstance().getMngOfficeDataBase().alta(Bean);
	}

	@Override
	public void remove(List<IBean> listBean) throws RemoveException, SQLException, ClassNotFoundException {
		ManagerDataBase.getInstance().getMngOfficeDataBase().remove(listBean);
	}




	@Override
	public List<IBean> refresh() throws RefreshException, SQLException, ClassNotFoundException {

		return ManagerDataBase.getInstance().getMngOfficeDataBase().refresh();
	}



	
}
